<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE>
<html dir="ltr" lang="en-gb">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link type="text/css" rel="Stylesheet"
	href="/PCT/StyleAll/styleLogIn.css" />
<link type="text/css" rel="Stylesheet" href="/PCT/StyleAll/styleAll.css" />
<title>查找疾病</title>
<style type="text/css">
.STYLE1 {
	font-size: 36px
}
</style>
</head>

<body class="browser-webkit can-transform has-shadows transform">
	<div class="header">
		<a> <img src="/PCT/image/Logo Small.png" width=1000px height=50px
			alt="Logo Small">
		</a>
	</div>
	<p>&nbsp;</p>
	<div class="page">
		<div id="page-header">
			<div id="search-box">
				<s:if test="#session.status.currentUser.userType == 1">病友：</s:if>
				<s:elseif test="#session.status.currentUser.userType == 2">医生：</s:elseif>
				<s:elseif test="#session.status.currentUser.userType == 3">管理员：</s:elseif>
				<a><s:property value="#session.status.currentUser.username" /></a>
				等级： <a><s:property value="#session.status.currentUser.rank" /></a>
				<img src="/PCT/image/2.png" width=15px height=15px> <a
					href=" <s:url action='logout' namespace='/secure'/>">退出</a>
			</div>
			<s:if test="#session.status.currentUser.userType != 0">
				<a
					href="<s:url action='redirectResult' namespace='/public'>
				<s:param name='redirectType' value='5' />
			</s:url>"
					class="button2">账户管理</a>
			</s:if>
			<a
				href="<s:url action='redirectResult' namespace='/public'>
				<s:param name='redirectType' value='10' />
	     	</s:url>"
				class="button2">我的群</a>
		</div>
		<div>
			<div class="panel">
				<div class="inner">
					<span class="corners-top"><span></span></span>
					<h2>病友互助社区 - 查找疾病</h2>
					<form name="frm">
						<select id="s1"
							onChange="redirec(document.frm.s1.options.selectedIndex)">
							<option selected>请选择</option>
							<option value="1">头部</option>
							<option value="2">颈部</option>
							<option value="3">胸部</option>
							<option value="4">腹部</option>
							<option value="5">生殖部</option>
							<option value="6">全身</option>
							<option value="7">其他</option>
						</select> <select id="s2" onchange="symptom()">
							<option id="请选择" selected>请选择</option>
						</select>
					</form>


					<script>
						//获取一级菜单长度
						var select1_len = document.frm.s1.options.length;
						var select2 = new Array(select1_len);
						//把一级菜单都设为数组
						for ( var i = 0; i < select1_len; i++) {
							select2[i] = new Array();
						}

						//定义基本选项
						select2[0][0] = new Option("请选择", " ");

						select2[1][0] = new Option("鼻塞", " ");
						select2[1][1] = new Option("打喷嚏", " ");
						select2[1][2] = new Option("流鼻涕", " ");
						select2[1][3] = new Option("听力减退", " ");
						select2[1][4] = new Option("头痛", " ");
						select2[1][5] = new Option("眩晕", " ");

						select2[2][0] = new Option("恶心呕吐", " ");
						select2[2][1] = new Option("反酸", " ");
						select2[2][2] = new Option("咯血", " ");
						select2[2][3] = new Option("呼吸异常", " ");
						select2[2][4] = new Option("进食困难", " ");
						select2[2][5] = new Option("咳嗽", " ");
						select2[2][6] = new Option("口吐白沫", " ");
						select2[2][7] = new Option("呕血", " ");
						select2[2][8] = new Option("有痰", " ");

						select2[3][0] = new Option("巨乳", " ");
						select2[3][1] = new Option("乳房肿块", " ");
						select2[3][2] = new Option("乳头发炎", " ");
						select2[3][3] = new Option("乳腺胀痛", " ");
						select2[3][4] = new Option("心律失常", " ");
						select2[3][5] = new Option("胸骨后疼痛", " ");
						select2[3][6] = new Option("胸闷", " ");
						select2[3][7] = new Option("胸痛", " ");

						select2[4][0] = new Option("腹痛", " ");
						select2[4][1] = new Option("腹泻", " ");
						select2[4][2] = new Option("腹胀", " ");
						select2[4][3] = new Option("肝痛", " ");
						select2[4][4] = new Option("黑便", " ");
						select2[4][5] = new Option("啤酒肚", " ");
						select2[4][6] = new Option("食欲较差", " ");
						select2[4][7] = new Option("消化不良", " ");
						select2[4][8] = new Option("腰痛", " ");

						select2[5][0] = new Option("白带增多", " ");
						select2[5][1] = new Option("痛经", " ");
						select2[5][2] = new Option("月经紊乱", " ");
						select2[5][3] = new Option("子宫出血", " ");

						select2[6][0] = new Option("抽搐", " ");
						select2[6][1] = new Option("出汗异常", " ");
						select2[6][2] = new Option("出血", " ");
						select2[6][3] = new Option("发烧", " ");
						select2[6][4] = new Option("关节痛", " ");
						select2[6][5] = new Option("肩背痛", " ");
						select2[6][6] = new Option("冷汗", " ");
						select2[6][7] = new Option("淋巴结肿大", " ");
						select2[6][8] = new Option("疲劳", " ");
						select2[6][9] = new Option("全身衰竭", " ");
						select2[6][10] = new Option("水肿", " ");
						select2[6][11] = new Option("无力", " ");
						select2[6][12] = new Option("消瘦", " ");
						select2[6][13] = new Option("易骨折", " ");
						select2[6][14] = new Option("震颤", " ");

						select2[7][0] = new Option("烦渴多饮", " ");
						select2[7][1] = new Option("幻觉", " ");
						select2[7][2] = new Option("昏迷", " ");
						select2[7][3] = new Option("脑力衰退", " ");
						select2[7][4] = new Option("尿急", " ");
						select2[7][5] = new Option("尿频", " ");
						select2[7][6] = new Option("尿失禁", " ");
						select2[7][7] = new Option("尿糖", " ");
						select2[7][8] = new Option("尿痛", " ");
						select2[7][9] = new Option("强迫观念", " ");
						select2[7][10] = new Option("强迫行为", " ");
						select2[7][11] = new Option("情绪低落", " ");
						select2[7][12] = new Option("少言", " ");
						select2[7][13] = new Option("失眠", " ");
						select2[7][14] = new Option("血尿", " ");
						select2[7][15] = new Option("血压高", " ");
						select2[7][16] = new Option("易激动", " ");
						select2[7][17] = new Option("阵发性痴笑", " ");
						select2[7][18] = new Option("性欲亢奋", " ");

						//联动函数
						function redirec(x) {
							var temp = document.frm.s2;
							for ( var i = 0; i < select2[x].length; i++) {
								temp.options[i] = new Option(
										select2[x][i].text, select2[x][i].value);
							}
							temp.options.length = select2[x].length;
							temp.options[0].selected = true;
						}
						function symptom() {
							var s2 = document.getElementById("s2");
							document.getElementById("text1").value = s2.options[s2.selectedIndex].text;
						}
						function allsymptom() {
							document.getElementById("text2").value = document
									.getElementById("text2").value
									+ document.getElementById("text1").value
									+ " ";
						}
					</script>
					<p>
						您想添加的症状是：<input type="text" id="text1" size="20">
					</p>
					<input type="button" value="add" onclick="allsymptom()">
					<p>您已经加入的症状是：</p>
					<s:form id="findDisease" action="findDisease" namespace="/public">
						<s:textarea rows="10" cols="40" id="text2" name="target"></s:textarea>
						<s:submit value="GO" class="button2" />
					</s:form>
				</div>
			</div>
		</div>
	</div>
	<div class="footer">
		<div class="copyright">
			<p class="copy-left">上海交通大学 软件学院</p>
			<p class="copy-right">
				设计风格 <a href=" http://www.artodia.com/">Artodia</a> 。
			</p>
		</div>
	</div>
</body>
</html>